package com.anons.logback;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LogbackDemo {
    private static  final Logger logger = LoggerFactory.getLogger(LogbackDemo.class);
    public static void main(String[] args) {
        logger.error(">>>>> hello");
        logger.warn(">>>>> hello");
        logger.info(">>>>> hello");
        // 占位符
        String name = "hanwei";
        logger.info("my name is {}",name);

        // 异常输出
        try {
            int i = 1/0;
        }catch (Exception e){
            logger.error("ex:",e);
        }
    }
}
